FROM java:8
MAINTAINER dranlyh <dranlyh@outlook.com>
COPY target/gateway-server-nacos-0.0.1-SNAPSHOT.jar app.jar
COPY agent/ /skyagent/
# 运行jar包
RUN bash -c 'touch /app.jar /skyagent/skywalking-agent.jar /skyagent/config/agent.config'
#RUN bash -c 'java -javaagent:/usr/local/skyagent/skywalking-agent.jar -Dskywalking.agent.service_name=springboot-test -Dskywalking.collector.backend_service=localhost:11800 -Djava.security.egd=file:/dev/./urandom -jar /app.jar'
CMD ["bash","-c","java -javaagent:/skyagent/skywalking-agent.jar -Dskywalking.agent.service_name=springboot-gateway-nacos -Dskywalking_config=/skyagent/config/agent.config -Djava.security.egd=file:/dev/./urandom -jar /app.jar"]
#ENTRYPOINT ["bash"," -javaagent:/usr/local/skyagent/skywalking-agent.jar -Dskywalking.agent.service_name=springboot-test -Dskywalking.collector.backend_service=localhost:11800 -Djava.security.egd=file:/dev/./urandom -jar /app.jar"]
#ENTRYPOINT ["java"," -javaagent:/usr/local/skyagent/skywalking-agent.jar -Dskywalking_config=/usr/local/skyagent/agent.config -Dskywalking.agent.service_name=springboot-test -Dskywalking.collector.backend_service=localhost:11800 -Dskywalking.logging.dir=/tmp/logs/ -Dskywalking.logging.file_name=skywalking.log -Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
#ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]

